package com.eorchis.module.planopinion.ui.commond;

import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.beanutils.BeanUtils;
import org.codehaus.jackson.map.ObjectMapper;
import com.eorchis.core.page.commond.SortInfoBean;
import com.eorchis.core.ui.commond.impl.BasePageQueryCommond;
import com.eorchis.core.ui.commond.IQueryCommond;

/**
 * Title: PlanOpinionCommond<br>
 * Description: 填写计划意见实体表Commond<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author RongSL
 * @createDate 2016-07-12
 * @version $Revision$
 */
public class PlanOpinionQueryCommond  extends BasePageQueryCommond implements IQueryCommond{

	private String[] searchOpinionIds;	
	private String searchPlanId;//计划id
	private String []searchPlanIds;//计划id
	private String searchDeptId;//部门id
	private String IssuedId;//下发表ID
	private String feedbackDateStr;//反馈时间
	private String []opinionTitleCodes;//标题类型
	private String []opinionTitleValues;//标题内容
	private String []deptNames;//部门名称
	private String searchDeptName;//部门名称
	private String []deptIds;//部门名称
	private Integer opinionState;
	/**
	 * 查询条件：ID
	 */
	private String searchOpinionId;				
	public String[] getSearchOpinionIds() {
		return searchOpinionIds;
	}
	public void setSearchOpinionIds(String[] searchOpinionIds) {
		this.searchOpinionIds = searchOpinionIds;
	}

	public String getSearchOpinionId() {
		return searchOpinionId;
	}
	public void setSearchOpinionId(String searchOpinionId) {
		this.searchOpinionId = searchOpinionId;
	}

	/**
	 * EXT 页面排序
	 */
	private SortInfoBean sortInfo = null;
	
	/**
	 * 获取排序内容
	 * 
	 * @return
	 * @author HuangS
	 * @date Jul 20, 2012
	 */
	public SortInfoBean getSortInfos() {
		return this.sortInfo;
	}
	/**
	 * 设置排序内容
	 * @param sort
	 * @author HuangS
	 * @date Jul 25, 2012
	 */
	@SuppressWarnings("unchecked")
	public void setSort(String sort) {
		if (sort != null && !"".equals(sort)) {
			sortInfo = new SortInfoBean();
			ObjectMapper objectMapper = new ObjectMapper();
			try {
				List<LinkedHashMap<String, Object>> list = objectMapper.readValue(sort, List.class);
				for (int i = 0; i < list.size(); i++) {
					Map<String, Object> map = list.get(i);
					Set<String> set = map.keySet();
					for (Iterator<String> it = set.iterator(); it.hasNext();) {
						String key = it.next();
						BeanUtils.setProperty(sortInfo, key, map.get(key));
					}
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}
	public String getSearchPlanId() {
		return searchPlanId;
	}
	public void setSearchPlanId(String searchPlanId) {
		this.searchPlanId = searchPlanId;
	}
	public String getSearchDeptId() {
		return searchDeptId;
	}
	public void setSearchDeptId(String searchDeptId) {
		this.searchDeptId = searchDeptId;
	}
	public String getIssuedId() {
		return IssuedId;
	}
	public void setIssuedId(String issuedId) {
		IssuedId = issuedId;
	}
	public String[] getOpinionTitleCodes() {
		return opinionTitleCodes;
	}
	public void setOpinionTitleCodes(String[] opinionTitleCodes) {
		this.opinionTitleCodes = opinionTitleCodes;
	}
	public String[] getOpinionTitleValues() {
		return opinionTitleValues;
	}
	public void setOpinionTitleValues(String[] opinionTitleValues) {
		this.opinionTitleValues = opinionTitleValues;
	}
	public String[] getDeptNames() {
		return deptNames;
	}
	public void setDeptNames(String[] deptNames) {
		this.deptNames = deptNames;
	}
	public String[] getDeptIds() {
		return deptIds;
	}
	public void setDeptIds(String[] deptIds) {
		this.deptIds = deptIds;
	}
	public String getFeedbackDateStr() {
		return feedbackDateStr;
	}
	public void setFeedbackDateStr(String feedbackDateStr) {
		this.feedbackDateStr = feedbackDateStr;
	}
	public Integer getOpinionState() {
		return opinionState;
	}
	public void setOpinionState(Integer opinionState) {
		this.opinionState = opinionState;
	}
	public String [] getSearchPlanIds() {
		return searchPlanIds;
	}
	public void setSearchPlanIds(String [] searchPlanIds) {
		this.searchPlanIds = searchPlanIds;
	}
	public String getSearchDeptName() {
		return searchDeptName;
	}
	public void setSearchDeptName(String searchDeptName) {
		this.searchDeptName = searchDeptName;
	}
}
